import axios from "@/utils/request.js";

/**
 * 添加报名信息
 * @param {*} applyInfo 
 * @returns 
 */
export const applyAddService = (applyInfo) => {
    return axios.post("/applyInfo/add",applyInfo)
}

/**
 * 分页查询报名信息
 * @param {*} pageNo 
 * @param {*} pageSize 
 * @returns 
 */
export const applySelectService = (pageNo,pageSize,matchNameFuzzy,userNameFuzzy,teacherNameFuzzy) => {
    return axios.get("/applyInfo/loadDataList",{params:{
        pageNo,pageSize,matchNameFuzzy,userNameFuzzy,teacherNameFuzzy
    }})
}

/**
 * 根据matchId和userId修改报名信息
 * @param {*} applyInfo 
 * @returns 
 */
export const applyModifyService = (applyInfo) => {
    return axios.put("/applyInfo/updateApplyInfoByUserIdAndMatchId",applyInfo)
}

/**
 * 根据报名信息id删除比赛信息
 * @param {*} list 
 * @returns 
 */
export const applyDeleteService = (userId,matchId) => {
    return axios.get("/applyInfo/deleteApplyInfoByUserIdAndMatchId",{params:{
        userId,matchId
    }})
}